﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace QuanLyThuNgan
{
    public class CaThuNganNhapDAO
    {
        public bool m_Insert(CaThuNganNhapDTO _info)
        {
            string _sql = string.Format("exec dbo.usp_ThuNgan_CaThuNganNhap_Insert {0},{1},{2}", _info.IIDCaThuNgan, _info.IIDNguoiNhap, _info.BbNgungSuDung == false ? 0 : 1);
            return Uit.it_SQL.ExecuteNonQuery(_sql, false);
        }
        public string m_Insert_(object IIDCaThuNgan, int IIDNguoiNhap, bool BbNgungSuDung)
        {
            string _sql = string.Format("exec dbo.usp_ThuNgan_CaThuNganNhap_Insert {0},{1},{2}",IIDCaThuNgan, IIDNguoiNhap,BbNgungSuDung==false? 0:1);
            return _sql;
        }
        public string m_Update(CaThuNganNhapDTO _info)
        {
            string _sql = string.Format("exec dbo.usp_ThuNgan_CaThuNganNhap_Update {0},{1},{2}", _info.IIDCaThuNgan, _info.IIDNguoiNhap, _info.BbNgungSuDung == false ? 0 : 1);
            //return Uit.it_SQL.ExecuteNonQuery(_sql, false);
            return _sql;
        }
        public string m_Delete(CaThuNganNhapDTO _info)
        {
            string _sql = string.Format("exec dbo.usp_ThuNgan_CaThuNganNhap_Delete {0},{1}", _info.IIDCaThuNgan, _info.IIDNguoiNhap);
           // return Uit.it_SQL.ExecuteNonQuery(_sql, false);
            return _sql;
        }
        
        //public DataTable SelectAllCaThuNgan()
        //{
        //    string _sql = string.Format("sp_ThuNgan_CaThuNgan_SelectAll  ");
        //    return Uit.it__sql.getDataTable(_sql, null, "");
        //}
    }
}
